

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="format-detection" content="telephone=no,email=no"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>扫码支付</title>
    <link href="pay.css" rel="stylesheet" media="screen">
    <link rel="stylesheet" href="../layui/css/layui.css"  media="all">
    <script src="https://lib.baomitu.com/jquery/3.3.1/jquery.min.js"></script>
</head>

<body>
<div class="body" id="body">

    <div class="mod-ct">
        <div id="orderbody">

            <div class="detail detail-open" id="orderDetail">
                <dl class="detail-ct" id="desc" >
                    <dt>金额</dt>
                    <dd id="price">{{reallyPrice}}</dd>
                    <dt>商户订单：</dt>
                    <dd>{{payId}}</dd>
                    <dt>创建时间：</dt>
                    <dd>{{formatDate(date)}}</dd>
                    <dt>商品名称</dt>
                    <dd>{{goodsName}}</dd>
                    <dt>商品内容</dt>
                    <dd style="color:red;">{{goodsCon}}</dd>

                </dl>

                <a href="javascript:void(0)" class="arrow" onclick="aaa()">查询<i class="layui-icon layui-icon-right"></i></a>
            </div>
        </div>


        <div class="tip-text">

        </div>


    </div>
    <div class="foot">
    </div>

</div>


<script src="https://lib.baomitu.com/vue/2.5.21/vue.min.js"></script>
<script>
<!--    function openAlipay(){-->
<!--       payAliUrl = document.getElementById("payAli").value;-->
<!--       window.location.href= payAliUrl;-->

<!--    }-->

</script>
<script>

    function aaa() {
         window.location.href= "http://shop.lidahei.cn/#about";
    }
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null)
            return decodeURI(r[2]);
        return null;
    }
    function formatDate(now) {
        now = new Date(now)
        return now.getFullYear()
            + "-" + (now.getMonth()>8?(now.getMonth()+1):"0"+(now.getMonth()+1))
            + "-" + (now.getDate()>9?now.getDate():"0"+now.getDate())
            + " " + (now.getHours()>9?now.getHours():"0"+now.getHours())
            + ":" + (now.getMinutes()>9?now.getMinutes():"0"+now.getMinutes())
            + ":" + (now.getSeconds()>9?now.getSeconds():"0"+now.getSeconds());

    }
    console.log(getQueryString("payId"));
    $.post("/getOrder2","payId="+getQueryString("payId"),function (data) {
        if (data.code==1){
            var time = new Date().getTime()-data.data.date;
            time = time/1000;
            time = data.data.timeOut*60 - time;
            if (data.data.state == -1){
                time = 0;
            }
            new Vue({
                el: '#orderbody',
                data: data.data
            })
        }else{
        }
    });


</script>
</body>
</html>